package net.cnki.sunny.base;

import org.springframework.security.core.context.SecurityContextHolder;

public class BaseController {

    public void getCurrentUser(){
        String username = SecurityContextHolder.getContext().getAuthentication().getName();
        System.out.println("当前登录的用户："+username);
    }
}
